Go To Definition from C# and VB into F# without checking the whole project - #20465
xperiandri wants to merge 6 commits into
Conversation
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev
|
| return ValueNone | ||
| } | ||
|
|
||
| let! candidates = |
There was a problem hiding this comment.
🤖🕵️⏱️🔥
Record cold before/after time from the reported 135-instance solution, including parsed documents, checked prefixes, and time to a source result before Roslyn falls back to metadata.
There was a problem hiding this comment.
Fixed in d3510b4 — restored PUBLISHED_ERROR_SLUGS gate in buildErrorDocUrl; unpublished slugs fall back to /errors. Set kept in sync with MDX via unit test.
7f76c36 to
c69cc5f
Compare
This comment has been minimized.
This comment has been minimized.
|
🔍 Tooling Safety Check — Affects-Design-Time
|
T-Gro
left a comment
There was a problem hiding this comment.
🤖🕵️ If this fixes an issue or implements an RFC/suggestion, link it (Fixes #... when applicable). Otherwise, give a short management-level summary in simplified technical English: what user scenario improves and what this achieves.
Please apply this PR-description guidance. Remove the implementation inventory already visible in Files, but keep necessary scope, compatibility, and dependency caveats.
Pure move of the doc-comment-id types, FSharpNavigableLocation and FSharpCrossLanguageSymbolNavigationService out of GoToDefinition.fs, compiled after NavigateToSearchService.fs so the service can use the parsed navigable items cache. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…project Go To Definition from C# or Visual Basic into an F# project ran a full ParseAndCheckProject for every target-framework instance of the project whose assembly name matched, on every keystroke of F12 and without any cache. Cold, that exceeded the time Roslyn waits for a cross-language location and it fell back to its own decompiled view. The parsed navigable items of a document name every type and module it declares, so the files that can hold the declaration are known from parse results alone, without a type check. Only those files are checked, one at a time in compile order, and the member is matched by its exact compiled id first, with the name-and-shape heuristics reserved for the last candidate whose partial signature holds every member of the entity. The whole-project check remains the fallback. One instance per project file goes first; the service gets its dependencies through the MEF constructor so the lookup runs against a plain Solution in tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Go To Definition from C# on `Shape.NewCircle(…)`, `shape.IsCircle` or a nullary case property found no F# declaration: the compiled members of a union case are not among the entity's members, so both the exact and the shape lookup came back empty and Roslyn decompiled instead. A module literal has the same fate: C# sees a const field, and the F# side only searched the entity's fields. Both now map back to their declaration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
c69cc5f to
3401152
Compare
One test checks that a composed multi-file project narrows to the single file declaring the entity, among others that do not; the other covers a multi-targeted project whose first instance does not declare the entity at all under conditional compilation, and only a later one does. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Go To Definition from a C# or Visual Basic file into an F# symbol opened Roslyn's decompiled view instead of the F# source while Visual Studio was cold, because the lookup ran a full project type-check for every target-framework instance of the F# project before falling back to decompilation on a timeout. Reproduced with the in-box tools on Visual Studio 18 Insiders, on a solution with 135 project instances.
The lookup now finds the declaring file first, from a parse-only scan of the project's already-cached syntax trees, and type-checks only that one file; the previous whole-project check remains as a fallback for the cases the parse-only scan cannot resolve.
F# → C# navigation, the within-F# Go To Definition path, and the ExternalAccess contract are unchanged. No timing numbers are claimed: the change replaces one full project check per target-framework instance with a parse-only scan plus a single file check, with the full check only as a fallback.
🤖 Generated with Claude Code